﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Delphi.Mimir.Data.Entities.Raw.Mappings {
    public class RawCashFlowMap : EntityTypeConfiguration<RawCashFlow> {
        public RawCashFlowMap() {
            /******************************************************************
            /* Table
            /*****************************************************************/
            ToTable("raw.eod_cash_flows");

            /******************************************************************
            /* Primary Key
            /*****************************************************************/
            HasKey(a => a.scf_id);

            /******************************************************************
            /* Index
            /*****************************************************************/
            // None

            /******************************************************************
            /* Relationships
            /*****************************************************************/
            // None

            /******************************************************************
            /* Properties
            /*****************************************************************/
            Property(a => a.scf_id)
                .IsRequired()
                .HasColumnName("scf_id");

            Property(a => a.scf_sym_cd)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("scf_sym_cd");

            Property(a => a.scf_exc_cd)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("scf_exc_cd");

            Property(a => a.scf_period)
                .IsRequired()
                .IsUnicode(false)
                .HasMaxLength(25)
                .HasColumnName("scf_period");

            Property(a => a.scf_dt)
                .IsRequired()
                .HasColumnName("scf_dt");

            Property(a => a.scf_depr)
                .IsOptional()
                .HasColumnName("scf_depr");

            Property(a => a.scf_adj_ni)
                .IsOptional()
                .HasColumnName("scf_adj_ni");

            Property(a => a.scf_chng_acct_recbls)
                .IsOptional()
                .HasColumnName("scf_chng_acct_recbls");

            Property(a => a.scf_chng_liab)
                .IsOptional()
                .HasColumnName("scf_chng_liab");

            Property(a => a.scf_chng_invtry)
                .IsOptional()
                .HasColumnName("scf_chng_invtry");

            Property(a => a.scf_chng_other_ops)
                .IsOptional()
                .HasColumnName("scf_chng_other_ops");

            Property(a => a.scf_tot_cfo)
                .IsOptional()
                .HasColumnName("scf_tot_cfo");

            Property(a => a.scf_capex)
                .IsOptional()
                .HasColumnName("scf_capex");

            Property(a => a.scf_inv)
                .IsOptional()
                .HasColumnName("scf_inv");

            Property(a => a.scf_other_inv)
                .IsOptional()
                .HasColumnName("scf_other_inv");

            Property(a => a.scf_tot_cfi)
                .IsOptional()
                .HasColumnName("scf_tot_cfi");

            Property(a => a.scf_div_paid)
                .IsOptional()
                .HasColumnName("scf_div_paid");

            Property(a => a.scf_sal_purch_st)
                .IsOptional()
                .HasColumnName("scf_sal_purch_st");

            Property(a => a.scf_net_borrow)
                .IsOptional()
                .HasColumnName("scf_net_borrow");

            Property(a => a.scf_other_fin)
                .IsOptional()
                .HasColumnName("scf_other_fin");

            Property(a => a.scf_tot_cff)
                .IsOptional()
                .HasColumnName("scf_tot_cff");

            Property(a => a.scf_fx_rate_chng)
                .IsOptional()
                .HasColumnName("scf_fx_rate_chng");

            Property(a => a.scf_chng_cash_and_eqv)
                .IsOptional()
                .HasColumnName("scf_chng_cash_and_eqv");
        }
    }
}
